package proj.pt.services;

import java.util.List;
import java.util.Map;
import java.util.Set;

import proj.pt.model.Course;
import proj.pt.model.Department;
import proj.pt.model.Exam;
import proj.pt.model.SubCourse;
import proj.pt.model.Subject;
import proj.pt.model.SubjectAllotment;
import proj.pt.model.User;
import proj.pt.web.ExamResultFilter;
import proj.pt.web.PerformanceResultFilter;
import proj.pt.web.SubjectFilter;
import proj.pt.web.UserFilter;

public interface LogicProcessor {

	public List getDepartments();
	public Department getDepartment(Long id);
	public void saveOrUpdateDepartment(Department department);
	public void deleteDepartment(Department department);
	public boolean validateDepartmentId(Department department);
	
	public List getCourses(User currentUser);
	public Course getCourse(Long id);
	public List getAllCourseSemesters();
	public SubCourse getSubCourse(Long id);
	public void saveOrUpdateCourse(Course course);
	public void deleteCourse(Course course);
	public Set getCourseBatches(Course course);
	public Set getSubCourses(Course course);
	public boolean validateCourseId(Course course);
	public boolean validateSubCourseId(String subcourseId);
	
	public List getSubjects();
	public Subject getSubject(Long id);
	public List getSubjectBySemester(SubCourse semester);
	public void saveOrUpdateSubject(Subject subject);
	public void deleteSubject(Subject subject);
	public boolean validateSubjectCode(Subject subject);
	
	public List getRoles();
	public List getUsers();
	public List getUsers(UserFilter filter);
	public User getUser(Long id);
	public void saveOrUpdateUser(User user);
	public void deleteUser(User user);
	public boolean checkForUsernameAvailability(User user);
	public boolean validateStaffId(User user);
	public boolean validateStudentId(User user);
	public boolean validateRegistrationNo(User user);
	public List getStaff(User currentUser);
	public List getStudents(SubCourse subCourse, User currentUser);
	
	public Exam getExam(Long id);
	public void saveOrUpdateExams(Exam exam);
	public void deleteExams(Exam exam);
	public boolean validateExamId(Exam exam);
	public List getExams(User currentUser, SubCourse subCourse, String examType);
	public List getExams(User currentUser, ExamResultFilter filter);
	
	public List getExamResults(Exam exam);
	public void saveExamResults(List results);
	
	public List getBatches();
	
	public User validateLogin(String username, String password);
	public Map getExamTypes();
	
	public List getSubjectAllotments(User currentUser, SubjectFilter filter);
	public SubjectAllotment getSubjectAllotment(Long id);
	public void saveOrUpdateSubjectAllotment(SubjectAllotment allotment);
	public void deleteSubjectAllotment(SubjectAllotment allotment);
	public boolean validateSubjectAllotment(SubjectAllotment allotment);
	public List getSubjectAllotmentsBy(User staff);
	public List getSubjectAllotmentsBy(Subject subject);
	
	public Map getPerformanceMatrix(PerformanceResultFilter filter);
}
